<?php
class Admin_Form_Search_TourCruise extends Apps_Plugin_Grid_Search_Abstract {
    public function preInit() {
        $dMapper 			= new M_Tool_DataMapper();

        $advancedCriteria = array(
            'en_title' => array(
                    'a.en_title',
                    self::$criteriaStringLike,
                    array(
                            'element'  => self::ELEMENT_TEXT,
                            'label'    => 'Title (EN)',
                    )
            ),
            'title' => array(
                    'a.title',
                    self::$criteriaStringLike,
                    array(
                            'element'  => self::ELEMENT_TEXT,
                            'label'    => 'Title (VI)',
                    )
            ),
            'en_name' => array(
                    'c.en_name',
                    self::$criteriaStringLike,
                    array(
                            'element'  => self::ELEMENT_TEXT,
                            'label'    => 'Cruise Name',
                    )
            ),
            'en_code' => array(
                    'c_i.en_code',
                    self::$criteriaStringLike,
                    array(
                            'element'  => self::ELEMENT_TEXT,
                            'label'    => 'Itinerary',
                    )
            ),
        );

        $simpleCriteria = array(
        		array('c_i_t.id LIKE ?', '%%%s%%'),
        		array('a.en_title LIKE ?', '%%%s%%'),
        		array('c.en_name LIKE ?', '%%%s%%')
        );

        $this->setAdvCriteria($advancedCriteria);
        $this->setSplCriteria($simpleCriteria);
    }
}